import { Component, OnInit, Inject } from '@angular/core';
import { ApiService } from '../../common/service/api/api.service';
import { DA_SERVICE_TOKEN, ITokenService } from '@delon/auth';
import { InfoService } from './services/info.service';
import { CommonService } from '../../common/service/common.service';
import {SiderComponent} from '../../common/components/sider/sider.component';

@Component({
  selector: 'app-info',
  templateUrl: './myHome.component.html',
  styleUrls: ['./myHome.component.less']
})
export class MyHomeComponent implements OnInit {
  title;
  constructor(
    private api: ApiService,
    private infoApi: InfoService,
    private modalService: CommonService,
    @Inject(DA_SERVICE_TOKEN) private tokenService: ITokenService,
  ) { }

  save ( ) {
    // this.modalService.showConfirm('nihao', 'jiaoshe' , this.fun);
    this.modalService.createModal('nihao', SiderComponent, this.fun);
  }
  fun() {
    alert(1);
  }
  ngOnInit() {
    // this.common.showConfirm();
    this.title = this.api.urlPrefix;
    console.log(this.tokenService.get());
    // this.infoApi.getIdentity()
    //   .subscribe(res => {
    //     console.log(res);
    //   });
  }

}
